<form id="pagerForm" method="post" action="">
	<input type="hidden" name="pageNum" value="{$pageNum}" />
	<input type="hidden" name="numPerPage" value="{$numPerPage}" />
	<input type="hidden" name="orderField" value="{$orderField}" />
	<input type="hidden" name="orderDirection" value="{$orderDirection}" />
	<input type="hidden" name="keywords" value="{$keywords}" />
	<input type="hidden" name="sfield" value="{$sfield}" />
	<input type="hidden" name="platform" value="{$platform}" />
	<input type="hidden" name="sfield_name" value="u.id,u.username,u.mobile" />
</form>

<div class="pageHeader">
	<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="" method="post">
		<input type="hidden" name="m" value="{$module_name}" />
		<input type="hidden" name="a" value="{$action_name}" />
	<div class="searchBar">
		<ul class="searchContent">
			<li style="width:210px;">
				<label style="width:60px;">关键字：</label>
				<input type="text" name="keywords" value="{$keywords}" style="width:120px;"/>
			</li>
			<li style="width:60px;">
			<select name="sfield" class="combox">
				<option value="all" {if $wherefields=='all'}selected="selected"{/if}>全部</option>
				<option value="u.username" {if $wherefields=='username'}selected="selected"{/if}>用户名</option>
				<option value="u.id" {if $wherefields=='id'}selected="selected"{/if}>用户ID</option>
				<option value="u.mobile" {if $wherefields=='mobile'}selected="selected"{/if}>手机号码</option>
			</select>
			<input type="hidden" name="sfield_name" value="u.id,u.username,u.mobile" />
			</li>
			
			<li>
				<select name="usergroup">
                        <option value="" {if $sfied=='all'}selected="selected"{/if}>全部</option>
                        <volist name="usergroup" id="row">
                            <option value='{$row.id}' {if $roleid  == $row['id']}  selected='selected' {/if}>{$row.name}  </option>
                        </volist>
                   </select>
			</li>
			
			<div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div>
		</ul>
	</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="{:U('User/add')}" target="dialog" width="580" height="350" rel="User_add"><span>添加用户</span></a></li>
			<!--<li><a class="edit" href="{:U('User/edit')}&id={sid_dv}" target="dialog" width="580" height="350" warn="请选择一个用户"><span>修改用户信息</span></a></li>-->
			<li><a class="icon" href="{:U('User/detail')}&id={sid_dv}" target="dialog" height="500" warn="请选择一个用户"><span>查看用户信息</span></a></li>
			<li><a class="icon" href="javascript:$.printBox('user_list')"><span>打印</span></a></li>
		</ul>
	</div>
	<div id="user_list">
	<table class="table" layoutH="113">
		<thead>
			<tr>
				<th width="22"><input type="checkbox" group="ids[]" class="checkboxCtrl"></th>
				<th width="60" orderField="id" {if $orderField=='id'}class="{$orderDirection}"{/if}>用户ID</th>
				<th width="90" orderField="username" {if $orderField=='username'}class="{$orderDirection}"{/if}>用户名</th>														
				<th width="120"  orderField="mobile" {if $orderField=='mobile'}class="{$orderDirection}"{/if}>手机</th>
				<th width="180"  orderField="email" {if $orderField=='email'}class="{$orderDirection}"{/if}>邮箱</th>
				<th>公司名</th>
				<th>地址</th>
				<th width="60" orderField="status" {if $orderField=='status'}class="{$orderDirection}"{/if}>系统状态</th>
				
				<th width="140" orderField="createtime" {if $orderField=='createtime'}class="{$orderDirection}"{/if}>注册</th>
				<th width="140" orderField="last_logintime" {if $orderField=='last_logintime'}class="{$orderDirection}"{/if}>最后登陆</th>
				<th width="100">角色</th>
				<th width="60">重置密码</th>
				<th width="120">操作</th>
			</tr>
		</thead>
		<tbody>
<volist name="list" id="vo">
	<php>
		$address='';
		$address.=$Area[$b2b[$vo['id']]['province']]['name'];
		$address.=$Area[$b2b[$vo['id']]['city']]['name'];
		$address.=$Area[$b2b[$vo['id']]['area']]['name'];
		$address.=$b2b[$vo['id']]['address'];
	</php>
			<tr target="sid_dv" rel="{$vo['id']}">
				<td><input name="ids[]" value="{$vo['id']}" type="checkbox"></td>
				<td>{$vo['id']}</td>
				<td><a title="查看" target="dialog" width="580" height="500" rel="User_detail_{$vo['id']}" href="{:U('User/detail',array('id'=>$vo['id']))}">{$vo['username']}</a></td>
				<td>{$vo['mobile']} <a title="编辑手机"  height="280" width="500" target="dialog" href="{:U('User/info_edit',array('id'=>$vo['id'],'type'=>'mobile'))}" class="add"><font>+</font></a></td>
				<td>{$vo['email']} <a title="编辑手机" height="280" width="500" target="dialog" href="{:U('User/info_edit',array('id'=>$vo['id'],'type'=>'email'))}" class="add"><font>+</font></a></td>
				
				<td>{$b2b[$vo['id']]['company']}</td>
				<td>{$address}</td>
				<td>
					{if $vo['status']=='0'}<a title='是否启用用户？' target='ajaxTodo' href="{:U('User/status',array('id'=>$vo['id'],'status'=>1))}">禁用</a>
                {else}<a title='是否禁用用户？' target='ajaxTodo' href="{:U('User/status',array('id'=>$vo['id'],'status'=>0))}">启用</a>
                {/if}
					
				</td>
				
				<td>{if $vo['createtime']}{$vo['createtime']|date="Y-m-d H:i:s",###}{else}--{/if}</td>
				<td>{if $vo['last_logintime']}{$vo['last_logintime']|date="Y-m-d H:i:s",###}{else}--{/if}</td>
				<td><font color="{if $userrole[$vo['id']]['role_id'] == 4}red{elseif $userrole[$vo['id']]['role_id'] == 3}{else}green{/if}">{$userrole[$vo['id']]['name']}</font></td>
				<td>	<a title="确定重置密码？" target="ajaxTodo" href="{:U('User/pwd_edit',array('id'=>$vo['id']))}" class="btnmm">重置密码</a>
				<td>
					<!--<a title="编辑" target="dialog" width="580" height="350"  rel="User_edit_{$vo['id']}" href="{:U('User/edit',array('id'=>$vo['id']))}" class="btnEdit">编辑</a>-->
					<a title="查看" target="dialog" width="580" height="500" rel="User_detail_{$vo['id']}" href="{:U('User/detail',array('id'=>$vo['id']))}" class="btnLook">查看</a>
					 <a title="编辑" target="dialog" width="580" height="350"  rel="User_edit_{$vo['id']}" href="{:U('User/add',array('id'=>$vo['id']))}" class="btnEdit">编辑</a>
					<a title="审核" target="dialog" width="880" height="450" rel="User_status_{$vo['id']}" href="{:U('User/userverify',array('id'=>$vo['id']))}" >审核</a>
				</td>
			</tr>
</volist>
		</tbody>
	</table>
	</div>
<include file="Index:pages" />
</div>
